import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.BitSet;
import java.util.function.BooleanSupplier;


public class CopyMp4 {
    public static void main(String[] args) throws IOException {
BufferedOutputStream bos = null;
BufferedInputStream bis=null;
      try {
        bis = new BufferedInputStream(new FileInputStream("1.mp4"));
        bos= new BufferedOutputStream(new FileOutputStream("c:\\gay.mp4"));
       byte[] bys=new byte[1024];
       int len=0;
       while((len=bis.read(bys))!=-1){
         bos.write(bys,0,len);

       }
      }catch ( Exception e){
        System.out.println(e.getMessage());
      }finally {
               if(bis!=null){
               bis.close();
               }
        if (bos!=null)
        {
          bos.close();
        }
      }

    }
}
